package com.pizza.gui;


import java.util.HashMap;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

import com.pizza.gui.konto.Loguj;
import com.pizza.gui.konto.RejestrujPanel;
import com.pizza.gui.konto.Rejestruj_cdPanel;
import com.pizza.gui.panele.KoszykPanel;
import com.pizza.gui.panele.ProduktyPanel;
import com.pizza.gui.panele.EdytujProfilPanel;
import com.pizza.gui.panele.UstaiweniaPanel;
import com.pizza.gui.panele.MenuBoczne;
import com.pizza.spring.rmi.Adres;
import com.pizza.spring.rmi.Logowanie;
import com.pizza.spring.rmi.Rejestruj;
import com.pizza.spring.rmi.User;
import com.pizza.spring.rmi.Zamowienie;

public class PizzaFram extends JFrame{
		static public User user;
	static public Adres adres;
	static public HashMap<String, JPanel> panele = new HashMap<String, JPanel>();
	
	public PizzaFram(){
	
		 panele.put("glowny", new PierwszyPanelImage(new ImageIcon("src/main/java/tittle.jpg").getImage()));
		panele.put("rejestruj1", new RejestrujPanel());
		panele.put("rejestruj2",new Rejestruj_cdPanel());
		panele.put("showProfile",new showProfile(user,adres));
		panele.put("loguj",new Loguj());
		panele.put("menuBoczne", new MenuBoczne());
		panele.put("edytujProfile",new EdytujProfilPanel());
		panele.put("orders",new ProduktyPanel(this));
		panele.put("settings",new UstaiweniaPanel());
		panele.put("koszyk", new KoszykPanel(this));
   
    
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    pack();
    setLocation(500, 100);
    setSize(600, 435);
    setVisible(true);
    for (JPanel panel : panele.values())add(panel);
	}
}

